package org.visionlibrary.image.filters.effects;

public class SinusDistortion {
	protected int distance = -60;

	public int[] getLut() {
		int[] lut = new int[256];
		for (int i = 0; i < 256; i++) {
			int divider = i + distance;
			if (divider == 0)
				divider = 1;
			lut[i] = (int) (255f * Math.sin(255f / divider));
		}
		return lut;
	}

	public int getDistance() {
		return distance;
	}

	public void setDistance(int distance) {
		this.distance = distance;
	}
}
